package com.xxl.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

/**
 * @author: xxl
 * @date: 2023/3/3
 * @ProjectDescription:
 */
@Data
@NoArgsConstructor
@Component
@Validated
@AllArgsConstructor
public class Dog {
    @Length(min = 1,max = 2,message = "长度不对")
    @Value("${dog.id}")
    public String id;
    private String name;
    private Integer age;
    private String love;
}
